﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DX.Learning.SimpleUserControlInsertion
{
    /// <summary>
    /// Generic <see cref="Model"/> controller
    /// </summary>
    /// <typeparam name="TModel">The type of the model.</typeparam>
    public class ModelController<TModel> : ControllerBase<TModel> where TModel : Model, new()
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ModelController{TModel}"/> class.
        /// </summary>
        public ModelController()
        {
            // Instanciates the Model.
            Model = new TModel();
        }

        /// <summary>
        /// Gets or sets the model.
        /// </summary>
        public TModel Model { get; set; }
    }
}
